package org.wangduqing.ibatisdao.hibernate.dao;

import java.io.Serializable;
import java.util.List;

import org.hibernate.Session;

public interface IGenericBaseCommonDao {
	
	public <T> void save(T entity);
	public <T> void saveOrUpdata(T entity); 
	public <T> void delete(T entitie);
	public <T> T get(T entitie);
	public <T> List<T> loadAll(T entitie);
	
	public <T> T get(Class<T> entityClass, final Serializable id);
	
	public Session getSession();
	
	public <T> T findUniqueByProperty(Class<T> entityClass, String propertyName, Object value);
	
	public <T> void deleteEntityById(Class<T> entityClass, Serializable id);
	
}
